package ui 
{
	import Base.Loader.SWFLoader;
	
	import Common.RenderManager;
	
	import flash.events.MouseEvent;

	/**
	 * ...
	 * @author ...
	 */
	public class MailUIHandler extends uiBase
	{
		public function MailUIHandler() 
		{
			path = "mail.swf";
			name = "MailUI";
		}
		
		public override function onInit( loader:SWFLoader ):void
		{
			super.onInit( loader );
			
			uiMc.closeBtn.addEventListener( MouseEvent.CLICK , onClose );
		}
		
		
		public override function resize():void
		{
			if ( uiMc )
			{
				uiMc.x = uiMc.px + 15;
				uiMc.y = RenderManager.instance.stageHeight * 0.1 + uiMc.py;
			}
		}
		
		
		public function onClose( e:MouseEvent ):void
		{
			visible( false );
		}
		
		
		public static var instance:MailUIHandler = null;
		public static function Instance():MailUIHandler
		{
			if ( instance == null )
			{
				instance = new MailUIHandler();
			}
			
			return instance;
		}
		
	}

}